package homework;

import java.util.HashSet;
import java.util.Hashtable;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author: knowno
 * @create: 2025-09-16 09:18
 * @Version 1.0
 **/
public class TestEmployee {
    public static void main(String[] args) {
        HashSet<Employee> employees = new HashSet<>();
        employees.add(new Employee(1,"a",1000,"软件开发工程师"));
        employees.add(new Employee(2,"b",2000,"软件测试工程师"));
        employees.add(new Employee(3,"c",3000,"软件实施"));
        employees.add(new Employee(3,"c",5000,"软件实施"));

        for (Employee employee : employees) {
            System.out.println(employee);
        }

        System.out.println("****************************");
        employees.forEach(employee -> System.out.println(employee));



        Hashtable<Integer,Employee> hashtable = new Hashtable<>();
        hashtable.put(1,new Employee(1,"a",1000,"软件开发工程师"));
        hashtable.put(2,new Employee(2,"b",2000,"软件测试工程师"));
        hashtable.put(3,new Employee(3,"c",3000,"软件实施"));
        hashtable.put(4,new Employee(4,"d",4000,"软件实施"));

        hashtable.forEach((k,v)->{
            System.out.println(k+" "+v);
        });
    }
}
